﻿using AutoMapper;
using SmartCity.BasicData.Api.Application.Commond.ADepartMent;
using SmartCity.BasicData.Api.Application.Commond.Area;
using SmartCity.BasicData.Api.Application.Commond.DepartMent;
using SmartCity.BasicData.Api.Application.Commond.GridType;
using SmartCity.BasicData.Api.Application.Commond.Login;
using SmartCity.BasicData.Api.Application.Commond.ProfessionalGrid;
using SmartCity.BasicData.Domain;

namespace SmartCity.BasicData.Api.Extensions
{
    public class AutoMapperProfile : Profile
    {
        public AutoMapperProfile()
        {
            CreateMap<LoginRequestCommand, AccountModel>().ReverseMap();
            CreateMap<DepartMentDTO, DepartmentsModel>().ReverseMap();
            CreateMap<ADepartMentDTO, DepartmentsModel>().ReverseMap();
            CreateMap<AreaDTO, AreasModel>().ReverseMap();
            CreateMap<GridTypeListDTO, GridTypeModel>().ReverseMap();
            CreateMap<DepartMentTreeDTO, DepartmentsModel>().ReverseMap(); 
            CreateMap<PrefessionalDTO, ProfessionalGridModel>().ReverseMap(); 
            CreateMap<AreaTreeDTO, AreasModel>().ReverseMap();

            //由于两个类名字一样,所以后写的加上了命名空间.这个叫完全限定
            CreateMap<SmartCity.BasicData.Api.Application.Commond.AreaTree.GetAreaTreeDTO, AreasModel>().ReverseMap();
             
        }
    }
}
